package cn.com.ycm.factorymethod;


import cn.com.ycm.entity.VehicleCar;

public class FactoryMethodTest {

    public static void main(String[] args){
        IcarFactory  icarFactory = new SedanFactory();
        VehicleCar vc = icarFactory.toCreate();
        vc.toCreateCar();


        icarFactory = new SuvCarFactory();
        vc = icarFactory.toCreate();
        vc.toCreateCar();



    }
}
